package com.laputa.model;

import java.util.Hashtable;
import java.util.Set;

import com.laputa.dao.model.Building;
import com.laputa.model.City;
import com.laputa.model.Ground;

public class City {
	private Long id;
	private Long groundCur;
	private Long groundTot;
	private Hashtable<Long, Ground> grounds;
	
	public City(){
		this.grounds = new Hashtable<Long, Ground>();
	}
	public void setGround(Ground ground){
		grounds.put(ground.getId(), ground);
	}
	
	public Ground getGround(Long groundID){
		return grounds.get(groundID);
	}
	
	public Building getBuilding(Long groundID){
		return getGround(groundID).getBuilding();
	}
	
	public Long getID(){
		return this.id;
	}
	
	public Long getgroundCur(){
		return this.groundCur;
	}
	
	public Long getgroundTot(){
		return this.groundTot;
	}
	
	public void setgroundCur(Long groundCur){
		this.groundCur = groundCur;
	}
	
	public void setgroundTot(Long groundTot){
		this.groundTot = groundTot;
	}
	
	public Set<Long> getGroundID(){
		return this.grounds.keySet();
	}
}
